<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>友和动态</title>
    <link rel="stylesheet" href="css/common.css" />
    <link rel="stylesheet" href="css/news.css" />
    <link rel="stylesheet" href="css/layout.css" />
    <link rel="stylesheet" href="css/menu.css" />
    <link rel="stylesheet" href="css/animate.css" />
    <link rel="stylesheet" href="css/swiper-img.css" />

    <script src="libs/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script
      src="libs/greensock/TweenMax.min.js"
      type="text/javascript"
    ></script>
    <script
      src="libs/greensock/CustomEase.min.js"
      type="text/javascript"
    ></script>
    <script src="libs/swiper-bundle.min.js" type="text/javascript"></script>
  </head>
  <body>
    <div class="main_cover"></div>
    <nav id="site_header" class="news_header"></nav>
    <nav id="top_menu" class="news_top_menu"></nav>

    <section class="o_page news_page">
      <div class="head_pic"></div>
      <div class="o_hero_area">
        <div class="m_navName">
          <div class="m_navName_inner">
            <span>友</span>
            <span>和</span>
            <span>动</span>
            <span>态</span>
          </div>
        </div>
      </div>

      <div class="o_container">
        <div class="o_container_inner">
          <div class="o_container_content">
            <div class="o_section part_1">
              <div class="row news_list">
                <!-- <div class="dt_item">
                  <div class="pic">
                    <img src="./static/index/a8.jpg" />
                  </div>

                  <div class="date">2019.09.01</div>
                  <div class="dt_title">
                    夏日好欢乐，2019年友和公寓酒店荔枝节
                  </div>

                  <div class="dt_sub_title">
                    不知不觉来到六月,广州的空气中弥漫着荔枝的香甜气息广州的空气中弥漫着荔枝的香甜气息
                  </div>
                  <div class="go_btn">
                    <img src="./static/index/a9.png" alt="" />
                  </div>
                </div>

                <div class="dt_item">
                  <div class="pic">
                    <img src="./static/index/a8.jpg" />
                  </div>

                  <div class="date">2019.09.01</div>
                  <div class="dt_title">
                    夏日好欢乐，2019年友和公寓酒店荔枝节
                  </div>
                  <div class="dt_sub_title">
                    不知不觉来到六月,广州的空甜气息
                  </div>

                  <div class="go_btn">
                    <img src="./static/index/a9.png" alt="" />
                  </div>
                </div> -->
              </div>

              <!-- <div class="btn_group">
                <div class="row wrap">
                  <div class="prev_btn">
                    <img src="./static/index/a9.png" alt="" />
                  </div>

                  <div class="col num_btn">
                    <div class="txt">1</div>
                  </div>
                  <div class="col num_btn">
                    <div class="txt">2</div>
                  </div>

                  <div class="col num_btn">
                    <div class="txt">3</div>
                  </div>

                  <div class="next_btn">
                    <img src="./static/index/a9.png" alt="" />
                  </div>
                </div>
              </div> -->
            </div>
          </div>
        </div>
      </div>
    </section>
    <nav id="site_footer"></nav>
  </body>

  <script>
    $.ajax({
      url: "http://test.yuwa.cn/index.php/api/news/index",
      data: { lang_type: 1, page_size: 10 },
      success: function (res) {
        console.log(res);
        let list = res.data.data;
        let box = document.querySelector(".news_list");
        let html = "";
        list.map((item) => {
          let div = document.createElement("a");
          div.href = `news-detail.html?id=${item.id}`
          div.className = "dt_item";
          div.innerHTML = `  <div class="pic">
                    <img src="${item.pic}" />
                  </div>

                  <div class="date">${item.create_time}</div>
                  <div class="dt_title">
                    ${item.title}
                  </div>
                  <div class="dt_sub_title">
                    ${item.sub_title}
                  </div>
                  <div class="go_btn">
                    <img src="./static/index/a9.png" alt="" />
                  </div>`;
          box.appendChild(div);
        });
      },
    });
  </script>
  <script src="js/utils.js" type="text/javascript"></script>
  <script src="js/menu.js" type="text/javascript"></script>
</html>
